;=====================================================
;     Modules
;=====================================================

;;;;;;;;;;;;;;;
;;   Jgmenu  ;;
;;;;;;;;;;;;;;;
[module/jgmenu]
type = custom/script
label = %output%
label-padding = 2
interval = 10
exec = echo ""
click-left = "jgmenu_run >/dev/null 2>&1 &"
click-right = exo-open $HOME/.config/jgmenu/jgmenurc



;;;;;;;;;;;;;;;;;;;
;; i3 Workspaces ;;
;;;;;;;;;;;;;;;;;;;
[module/i3]
type = internal/i3
pin-workspaces = true
strip-wsnumbers = true
index-sort = true
enable-click = true
fuzzy-match = true
ws-icon-default = 
format = <label-state><label-mode>
format-background = ${colors.module-bg}
label-mode = %mode%
label-mode-padding = 0
label-focused =  %name%
label-focused-padding = 3
label-unfocused =  %name%
label-unfocused-padding = 3
label-visible =  %name%
label-visible-padding = 3
label-urgent = %name%
label-urgent-padding = 3
label-mode-underline = ${colors.urgent}
label-focused-underline = ${colors.trim}
label-visible-underline = ${colors.trim}
label-urgent-underline = ${colors.urgent}



;;;;;;;;;;;;;
;; Network ;;
;;;;;;;;;;;;;
[module/network]
type = custom/script
exec = check-network
label-padding = 2
tail = true
format-background = ${colors.module-bg}
format-foreground = ${colors.foreground}

;;;;;;;;;;;;;;;;;;;
;; Window Switch ;;
;;;;;;;;;;;;;;;;;;;
[module/window_switch]
type = custom/script
interval = 5
label = %output%
click-left = skippy-xd
click-right = skippy-xd
exec = echo "  "
format = <label>


;;;;;;;;;
;; CPU ;;
;;;;;;;;;
[module/coreuse]
type = internal/cpu
interval = 3
format-padding = 1
format = <label><ramp-coreload>
label = %{A1:termite --exec=htop & disown:} %percentage%% %{A}
ramp-coreload-0 = ▂
ramp-coreload-1 = ▃
ramp-coreload-2 = ▄
ramp-coreload-3 = ▅
ramp-coreload-4 = ▆
ramp-coreload-5 = ▇
ramp-coreload-0-foreground = ${colors.foreground}
ramp-coreload-1-foreground = ${colors.foreground}
ramp-coreload-2-foreground = ${colors.yellow}
ramp-coreload-3-foreground = ${colors.yellow}
ramp-coreload-4-foreground = ${colors.urgent}
ramp-coreload-5-foreground = ${colors.urgent}


;;;;;;;;;
;; MEM ;;
;;;;;;;;;
[module/memory]
type = internal/memory
interval = 3
format = <label>
label-padding = 1
label = %{A1:termite --exec=htop & disown:} %percentage_used%%%{A}


;;;;;;;;;
;; PKG ;;
;;;;;;;;;
[module/pkg]
type = custom/script
exec = updates.sh
exec-if = "ping -q -w 2 -c 1 176.34.135.167 > /dev/null"
label = %{A1:termite --exec=pacli & disown:} %{A3:termite --exec=pacli & disown:}%output%%{A} %{A}
tail = true


;;;;;;;;;;;
;; Clock ;;
;;;;;;;;;;;
[module/clock]
type = internal/date
format = <label>
format-background = ${colors.module-bg}
lebel-padding = 1
interval = 5
time = %R
label = %{A1:gsimplecal & disown:} %{A3:gsimplecal & disown:} %time%%{A} %{A}


;;;;;;;;;;;;;;;;;
;; TEMPERATURE ;;
;;;;;;;;;;;;;;;;;
[module/temperature]
type = internal/temperature
interval = 3
thermal-zone = 0
warn-temperature = 70
format = <ramp><label>
format-background = ${colors.module-bg}
format-padding = 1
label = %{A1:st --exec='watch sensors' & disown:} %temperature%%{A}
ramp-0 =  
ramp-1 =  
ramp-2 =  
ramp-3 =  
ramp-0-foreground = ${colors.foreground}
ramp-1-foreground = ${colors.foreground}
ramp-2-foreground = ${colors.foreground}
ramp-3-foreground = ${colors.foreground}
format-warn = <label-warn>
label-warn = " %temperature%"
label-warn-padding = 2
label-warn-foreground = ${colors.urgent}
label-warn-background = ${colors.module-bg}

;;;;;;;;;;;;;;;
;; Brightness;;
;;;;;;;;;;;;;;;
[module/backlight]
type = internal/xbacklight
interval = 0.5
format = <ramp> <label>
format-background = ${colors.module-bg}
label = %percentage%%
ramp-0 = ""
ramp-0-foreground = ${colors.foreground}
format-padding = 2
; Create scroll handlers used to set the backlight value
; Default: true
enable-scroll = false


;;;;;;;;;;;;
;; Volume ;;
;;;;;;;;;;;;
[module/volume]
type = internal/volume
master-mixer = Master
format-volume-padding = 2
label-volume-foreground = ${colors.foreground}
label-volume  = %{A3:pavucontrol & disown:}%percentage%%%{A}
format-volume = <ramp-volume> <label-volume>
format-volume-background = ${colors.module-bg}
label-muted   = " muted "
label-muted-background =${colors.module-bg}
ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-2 = 
ramp-volume-3 = 
label-muted-foreground   = ${colors.foreground}
ramp-volume-0-foreground = ${colors.foreground}
ramp-volume-1-foreground = ${colors.foreground}
ramp-volume-2-foreground = ${colors.foreground}
ramp-volume-3-foreground = ${colors.foreground}


;;;;;;;;;;;;;
;; BATTERY ;;
;;;;;;;;;;;;;
[module/battery]
type = internal/battery
; Use $ ls -1 /sys/class/power_supply/
battery = BAT1
adapter = AC
full-at = 98
poll-interval = 5
time-format = %H:%M

format-charging    = <animation-charging> <label-charging>
format-discharging = <ramp-capacity> <label-discharging>
format-full        = <ramp-capacity> <label-full>
format-charging-background = ${colors.module-bg}
format-discharging-background = ${colors.module-bg}
format-full-background = ${colors.module-bg}
format-charging-padding = 2
format-discharging-padding = 2
format-full-padding = 2

ramp-capacity-0 = ""
ramp-capacity-1 = ""
ramp-capacity-2 = ""
ramp-capacity-3 = ""
ramp-capacity-4 = ""
;ramp-capacity-0-foreground = ${colors.urgent}
;ramp-capacity-1-foreground = #ffa900
ramp-capacity-foreground = ${colors.foreground}

bar-capacity-width = 10
animation-charging-0 = ""
animation-charging-1 = ""
animation-charging-2 = ""
animation-charging-3 = ""
animation-charging-4 = ""
animation-charging-foreground = ${colors.foreground} 
animation-charging-framerate = 750


;;;;;;;;;;
;; MENU ;;
;;;;;;;;;;
[module/menu]
type = custom/menu
format-spacing = 1
label-open = "    "
label-close = "    "
label-close-foreground = ${colors.urgent}
label-separator = " | "
# Top level
menu-0-0 = "  "
menu-0-0-exec = menu-open-1
menu-0-1 = "  "
menu-0-1-exec = menu-open-2
menu-0-2 = "    |"
menu-0-2-exec = menu-open-3
# 1
menu-1-0 = "  "
menu-1-0-exec = menu-open-0
menu-1-0-foreground = ${colors.urgent}
menu-1-1 = "  "
menu-1-1-exec = exo-open --launch WebBrowser
menu-1-2 = "  "
menu-1-2-exec = exo-open --launch TerminalEmulator
menu-1-3 = "    |"
menu-1-3-exec = exo-open --launch FileManager
# 2
menu-2-0 = "  "
menu-2-0-exec = menu-open-0
menu-2-0-foreground = ${colors.urgent}
menu-2-1 = "  "
menu-2-1-exec = termite --exec=pacli &
menu-2-2 = "  "
menu-2-2-exec = xfce4-settings-manager &
menu-2-3 = "    |"
menu-2-3-exec = pavucontrol &
# 3
menu-3-0 = "  "
menu-3-0-exec = menu-open-0
menu-3-0-foreground = ${colors.urgent}
menu-3-1 = "   "
menu-3-1-exec = i3lock-fancy -p -f Ubuntu &
menu-3-2 = "   "
menu-3-2-exec = systemctl -i reboot
menu-3-3 = "      |"
menu-3-3-exec = systemctl -i poweroff


;;;;;;;;;;;;;;;;;;;;
;; Compton Toggle ;;
;;;;;;;;;;;;;;;;;;;;
[module/compton_toggle]
type = custom/script
tail = true
label = %output%
click-left = toggle.sh -c -tg &
exec = toggle.sh -c
format = <label>


;;;;;;;;;;;;;;;
;; KEYBOARD ;;
;;;;;;;;;;;;;;;
[module/keyboard]
type           = internal/xkeyboard
blacklist-0    = scroll lock
format         = <label-layout> <label-indicator>
format-spacing = 0

; Available tokens:
;   %layout%
;   %name%
;   %number%
; Default: %layout%
label-layout   = %{A1:mintlocale & disown:} %{A3:mintlocale & disown:} %layout%%{A} %{A}

; Available tokens:
;   %name%
; Default: %name%
label-indicator = %name%
label-indicator-padding = 2
label-indicator-background = #8139e8


;;;;;;;;;;;;;;
;; ETHERNET ;;
;;;;;;;;;;;;;;
[module/wired-network]
type = internal/network
interface =
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-connected =  %local_ip%
format-connected-foreground = ${colors.purple}


;;;;;;;;;;;;;;
;; REDSHIFT ;;
;;;;;;;;;;;;;;
[module/redshift]
type = custom/script
tail = true
exec = toggle.sh -r
label = %output%
click-left = toggle.sh -r -tg &


;;;;;;;;;;;;;;;;
;; FILESYSTEM ;;
;;;;;;;;;;;;;;;;
[module/filesystem]
type = internal/fs
format-mounted = <label-mounted>
label-mounted = %mountpoint% : %percentage_free%%
mount-0 = /
interval = 1200
fixed-values = false
spacing = 2
label-mounted-foreground = ${colors.yellow}


;;;;;;;;;
;; MPD ;;
;;;;;;;;;
[module/mpd]
type = internal/mpd
format-online = <icon-prev> <icon-stop> <toggle> <icon-next>  <label-song>
format-online-foreground = #FEFEFE
format-online-background = ${colors.format-bg}
format-offline = <label-offline>
bar-progress-format = %{+o +u}%fill%%{-o -u}%indicator%%{+o +u}%empty%%{-u -o}
label-offline = 
label-song = %title%
format-online-prefix = " "
icon-play = 
icon-pause = 
icon-stop = 
icon-prev = 
icon-next = 
icon-random = 
icon-repeat = 
toggle-on-foreground =
toggle-off-foreground = #55
bar-progress-width = 35
bar-progress-indicator = █
bar-progress-fill = █
bar-progress-empty = ▒
bar-progress-empty-font = 2
bar-progress-indicator-font = 2
bar-progress-fill-font = 2
bar-progress-fill-foreground = #bb
bar-progress-empty-foreground = #44
bar-progress-indicator-foreground = #A85659


;;;;;;;;;;
;; WIFI ;;
;;;;;;;;;;
[module/wireless-network]
type = internal/network
interface = wlp2s0

format-connected = <ramp-signal>  <label-connected>
format-packetloss = <animation-packetloss>
label-connected = " %local_ip% "
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-5 = 
ramp-signal-0-foreground = #F03051
ramp-signal-1-foreground = #F07127
ramp-signal-2-foreground = #F9CE56
ramp-signal-3-foreground = ${colors.purple}
ramp-signal-4-foreground = ${colors.purple}
ramp-signal-5-foreground = ${colors.purple}
animation-packetloss-0 = ⚠
animation-packetloss-1 = 📶
animation-packetloss-0-foreground = #ffa64c
animation-packetloss-1-foreground = #000000
animation-packetloss-framerate = 500


;;;;;;;;;;;;;;;;
;; VOLUME BAR ;;
;;;;;;;;;;;;;;;;
[module/volume-bar]
type = internal/volume
bar-volume-font = 2
bar-volume-width = 20
format-volume = <label-volume><bar-volume>
label-volume = "  "
label-muted = "   mute"
label-volume-foreground = #B6C2E7
format-muted-foreground = #E76BB4
bar-volume-foreground-0 = #92A3F7
bar-volume-foreground-1 = #92A3F7
bar-volume-foreground-2 = #6BB3E7
bar-volume-foreground-3 = #6BB3E7
bar-volume-foreground-4 = #6BB3E7
bar-volume-foreground-5 = #6BE7D8
bar-volume-foreground-6 = #6BE7D8
bar-volume-gradient = true
bar-volume-indicator = |
bar-volume-fill = •
bar-volume-empty = ·
bar-volume-empty-foreground = #666666


;;;;;;;;;;;;;
;;ESTHETICS;;
;;;;;;;;;;;;;
[module/MAL]
type = custom/text
content = %{T6}◢%{T-}
content-foreground = ${colors.module-bg}
content-background = ${colors.format-bg}

[module/MAL2]
type = custom/text
content = %{T6}◢%{T-}
content-foreground = ${colors.format-bg}
content-background = ${colors.module-bg}

[module/MAR]
type = custom/text
content = %{T6}◣%{T-}
content-foreground = ${colors.module-bg}
content-background = ${colors.format-bg}

[module/MAR2]
type = custom/text
content = %{T6}◣%{T-}
content-foreground = ${colors.format-bg}
content-background = ${colors.module-bg}
